package foundation.letters_graphics;

import java.util.Scanner;

/**
 * 输出一个n行m列的图形。
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int m = sc.nextInt();
        int u = n >= m ? n : m;
        char[][] letters = new char[u][u];
        // A的左边
        for (int i = 0; i < u; i++) {
            char letter = 'A'; // 65
            for (int j = i; j >= 0; --j) {
                letters[i][j] = letter;
                letter ++;
            }
        }
        // A的右边
        for (int i = 0; i < u; i++) {
            char letter = 'B';
            for (int j = i + 1; j < u; j++) {
                letters[i][j] = letter;
                letter ++;
            }
        }
        for (int i = 0; i < n; i++) {
            for (int j = 0; j < m; j++) {
                System.out.print(letters[i][j]);
            }
            System.out.println();
        }
    }
}
